<?php

namespace App\Listeners;

use App\Events\Event;
use Carbon\Carbon;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;

class EventListener
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Handle the event.
     *
     * @param  Event  $event
     * @return void
     */
    public function handle(Event $event)
    {
        $txt = $event->txt;
        $user = $event->user;
        $dialogueId=$event->dialogueId;
        //DB::table('chat')->insertGetId(['user_id'=>$user->id,'user_name'=>$user->name,'user_headpic'=>$user->headpic,'time'=>time(),'txt'=>$txt]);
    }
}
